home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / python2.4 / test / test___all__.pyc (.txt) < prev    next >
Python Compiled Bytecode  |  2005-10-18  |  5KB  |  192 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.4)
  3.  
  4. import unittest
  5. from test import test_support
  6. from test.test_support import verify, verbose
  7. import sys
  8. import warnings
  9. warnings.filterwarnings('ignore', ".* 'pre' .*", DeprecationWarning, 'pre$')
  10. warnings.filterwarnings('ignore', '.* regsub .*', DeprecationWarning, '^regsub$')
  11. warnings.filterwarnings('ignore', '.* statcache .*', DeprecationWarning, 'statcache$')
  12.  
  13. class AllTest(unittest.TestCase):
  14.     
  15.     def check_all(self, modname):
  16.         names = { }
  17.         
  18.         try:
  19.             exec 'import %s' % modname in names
  20.         except ImportError:
  21.             return None
  22.  
  23.         verify(hasattr(sys.modules[modname], '__all__'), '%s has no __all__ attribute' % modname)
  24.         names = { }
  25.         exec 'from %s import *' % modname in names
  26.         if names.has_key('__builtins__'):
  27.             del names['__builtins__']
  28.         
  29.         keys = set(names)
  30.         all = set(sys.modules[modname].__all__)
  31.         verify(keys == all, '%s != %s' % (keys, all))
  32.  
  33.     
  34.     def test_all(self):
  35.         if not sys.platform.startswith('java'):
  36.             import _socket as _socket
  37.         
  38.         self.check_all('BaseHTTPServer')
  39.         self.check_all('Bastion')
  40.         self.check_all('CGIHTTPServer')
  41.         self.check_all('ConfigParser')
  42.         self.check_all('Cookie')
  43.         self.check_all('MimeWriter')
  44.         self.check_all('Queue')
  45.         self.check_all('SimpleHTTPServer')
  46.         self.check_all('SocketServer')
  47.         self.check_all('StringIO')
  48.         self.check_all('UserString')
  49.         self.check_all('aifc')
  50.         self.check_all('atexit')
  51.         self.check_all('audiodev')
  52.         self.check_all('base64')
  53.         self.check_all('bdb')
  54.         self.check_all('binhex')
  55.         self.check_all('calendar')
  56.         self.check_all('cgi')
  57.         self.check_all('cmd')
  58.         self.check_all('code')
  59.         self.check_all('codecs')
  60.         self.check_all('codeop')
  61.         self.check_all('colorsys')
  62.         self.check_all('commands')
  63.         self.check_all('compileall')
  64.         self.check_all('copy')
  65.         self.check_all('copy_reg')
  66.         self.check_all('csv')
  67.         self.check_all('dbhash')
  68.         self.check_all('decimal')
  69.         self.check_all('difflib')
  70.         self.check_all('dircache')
  71.         self.check_all('dis')
  72.         self.check_all('doctest')
  73.         self.check_all('dummy_thread')
  74.         self.check_all('dummy_threading')
  75.         self.check_all('filecmp')
  76.         self.check_all('fileinput')
  77.         self.check_all('fnmatch')
  78.         self.check_all('fpformat')
  79.         self.check_all('ftplib')
  80.         self.check_all('getopt')
  81.         self.check_all('getpass')
  82.         self.check_all('gettext')
  83.         self.check_all('glob')
  84.         self.check_all('gopherlib')
  85.         self.check_all('gzip')
  86.         self.check_all('heapq')
  87.         self.check_all('htmllib')
  88.         self.check_all('httplib')
  89.         self.check_all('ihooks')
  90.         self.check_all('imaplib')
  91.         self.check_all('imghdr')
  92.         self.check_all('imputil')
  93.         self.check_all('keyword')
  94.         self.check_all('linecache')
  95.         self.check_all('locale')
  96.         self.check_all('macpath')
  97.         self.check_all('macurl2path')
  98.         self.check_all('mailbox')
  99.         self.check_all('mailcap')
  100.         self.check_all('mhlib')
  101.         self.check_all('mimetools')
  102.         self.check_all('mimetypes')
  103.         self.check_all('mimify')
  104.         self.check_all('multifile')
  105.         self.check_all('netrc')
  106.         self.check_all('nntplib')
  107.         self.check_all('ntpath')
  108.         self.check_all('opcode')
  109.         self.check_all('optparse')
  110.         self.check_all('os')
  111.         self.check_all('os2emxpath')
  112.         self.check_all('pdb')
  113.         self.check_all('pickle')
  114.         self.check_all('pickletools')
  115.         self.check_all('pipes')
  116.         self.check_all('popen2')
  117.         self.check_all('poplib')
  118.         self.check_all('posixpath')
  119.         self.check_all('pprint')
  120.         self.check_all('pre')
  121.         self.check_all('profile')
  122.         self.check_all('pstats')
  123.         self.check_all('pty')
  124.         self.check_all('py_compile')
  125.         self.check_all('pyclbr')
  126.         self.check_all('quopri')
  127.         self.check_all('random')
  128.         self.check_all('re')
  129.         self.check_all('reconvert')
  130.         self.check_all('regsub')
  131.         self.check_all('repr')
  132.         self.check_all('rexec')
  133.         self.check_all('rfc822')
  134.         self.check_all('rlcompleter')
  135.         self.check_all('robotparser')
  136.         self.check_all('sched')
  137.         self.check_all('sets')
  138.         self.check_all('sgmllib')
  139.         self.check_all('shelve')
  140.         self.check_all('shlex')
  141.         self.check_all('shutil')
  142.         self.check_all('smtpd')
  143.         self.check_all('smtplib')
  144.         self.check_all('sndhdr')
  145.         self.check_all('socket')
  146.         self.check_all('sre')
  147.         self.check_all('_strptime')
  148.         self.check_all('statcache')
  149.         self.check_all('symtable')
  150.         self.check_all('tabnanny')
  151.         self.check_all('tarfile')
  152.         self.check_all('telnetlib')
  153.         self.check_all('tempfile')
  154.         self.check_all('textwrap')
  155.         self.check_all('threading')
  156.         self.check_all('timeit')
  157.         self.check_all('toaiff')
  158.         self.check_all('tokenize')
  159.         self.check_all('traceback')
  160.         self.check_all('tty')
  161.         self.check_all('unittest')
  162.         self.check_all('urllib')
  163.         self.check_all('urlparse')
  164.         self.check_all('uu')
  165.         self.check_all('warnings')
  166.         self.check_all('wave')
  167.         self.check_all('weakref')
  168.         self.check_all('webbrowser')
  169.         self.check_all('xdrlib')
  170.         self.check_all('zipfile')
  171.         
  172.         try:
  173.             self.check_all('rlcompleter')
  174.         finally:
  175.             
  176.             try:
  177.                 import locale
  178.             except ImportError:
  179.                 pass
  180.  
  181.             locale.setlocale(locale.LC_CTYPE, 'C')
  182.  
  183.  
  184.  
  185.  
  186. def test_main():
  187.     test_support.run_unittest(AllTest)
  188.  
  189. if __name__ == '__main__':
  190.     test_main()
  191.  
  192.